#define _CRT_SECURE_NO_WARNINGS 1
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
const int N = 2e5 + 10;
int a[N], b[N];

void solve() {
    int n, k; cin >> n >> k;
    for (int i = 1; i <= n; i++) cin >> a[i];
    int lst = -2e9 - 10, f = 0;
    for (int i = 1; i <= n; i++) {
        b[i] = a[i] - k;
        b[i] = max(b[i], lst);
        if (b[i] > a[i] + k) {
            f = 1;
            break;
        }
        lst = b[i];
    }
    if (f) cout << "No" << endl;
    else cout << "Yes" << endl;
}

int main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int t; cin >> t;
    while (t--) {
        solve();
    }
    return 0;
}